package com.basics.loan.web.boss.dao;


import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.basics.loan.web.boss.bean.domain.Resource;
import com.basics.loan.web.boss.bean.dto.ResourceMenuDto;
/**
 * 菜单资源DAO
 *
 * @author yangxiaobing
 * @date   2017/7/24
 *
 */
@Mapper
public interface ResourceMapper {
    
    int deleteByPrimaryKey(Integer resId);

    int insert(Resource record);

    void insertSelective(Resource record);

    Resource selectByPrimaryKey(Integer resId);

    int updateByPrimaryKeySelective(Resource record);

    int updateByPrimaryKey(Resource record);

    Long selectCountResource(Resource resource);

    Long selectCountResParentByResId(Integer resParentid);
    
    List<Resource> selectResourceListByPage(Resource resource);

    List<ResourceMenuDto>selectParentIdResList();

    List<Resource> selectResLevelListByParentid(@Param("resParentid") Integer resParentid);

    List<Resource> selectResourceAllList();

    List<Resource> selectResUrlAllList();

    List<Resource> selectParentResListByResTypeAndResLevel(@Param("resType") Integer resType,@Param("resLevel") Integer resLevel,@Param("resId") Integer resId);

    List<Resource> selectResListByUserId(@Param("userId") Integer userId);





}